package com.itheima.crm.mapper;

import java.util.List;


import com.itheima.crm.pojo.Organization;


public interface OrganizationDao {

	
	//总条数
	public Integer OrganizationCount(Organization organization);
	//结果集
	public List<Organization> selectOrganization(Organization organization);
	
	//通过ID查询部门
	public Organization selectOrganizationById(Integer id);
	//修改部门通过ID
	public void updateOrganizationById(Organization organization);
	//通过ID 删除部门
	public void deleteOrganization(Organization organization);
	//插入新部门
	public void insertOrganization(Organization organization);
	//增加或删除员工时更新部门人数
	public Integer updateOrganizationCount();
	//当员工表中部门员工一个不剩时，将部门人数置为0
	public void updateOrganizationCountto0(String org);
	//通过部门名查对象
	public Organization  selectOrganizationByOname(String oname);
	
	// 通过部门更改部门经理
	public void updateManager(Organization o);
}
